﻿@model IEnumerable<Contract.Business.Entity.BEConsulta>

@{
    ViewBag.Title = "Agendar";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Consultas</h2>

<p>
    @Html.ActionLink("Nova Consulta", "Create")
</p>
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.NomeCliente)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.DataHora)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.NomeCliente)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.DataHora)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.Codigo }) |
            @Html.ActionLink("Details", "Details", new { id = item.Codigo }) |
            @Html.ActionLink("Delete", "Delete", new { id = item.Codigo })
        </td>
    </tr>
}

</table>
